import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { AdminComponent } from './admin/admin.component';
import { RoleComponent } from './role/role.component';
import { MenuComponent } from './menu/menu.component';
import { ResourceComponent } from './resource/resource.component';
import { AllocMeunComponent } from './role/alloc-meun/alloc-meun.component';
import { AllocResourceComponent } from './role/alloc-resource/alloc-resource.component';

const routes: Routes = [
  { path: '', pathMatch: 'full', redirectTo: 'admin' },
  { path: 'admin', component: AdminComponent, data: { breadcrumb: '用户管理' } },
  { path: 'role', component: RoleComponent, data: { breadcrumb: '角色管理' } },
  { path: 'menu', component: MenuComponent, data: { breadcrumb: '菜单列表' } },
  { path: 'resource', component: ResourceComponent, data: { breadcrumb: '资源列表' } },
  { path: 'allocMenu', component: AllocMeunComponent, data: { breadcrumb: '分配菜单' } },
  { path: 'allocResource', component: AllocResourceComponent, data: { breadcrumb: '分配资源' } },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class UmsRoutingModule { }
